Ext.define('Menu', {
    extend: 'Ext.data.Model',
    fields: [
        {name: 'id',  type: 'string'},
        {name: 'menuName',  type: 'string'},
        {name: 'parentId',  type: 'int'}
    ]
});

Ext.define('Department', {
    extend: 'Ext.data.Model',
    fields: [
        {name: 'id',  type: 'string'},
        {name: 'deptName',  type: 'string'},
        {name: 'parentId',  type: 'int'}
    ]
});



Ext.define('Employee', {
    extend: 'Ext.data.Model',
    fields: [
        {name: 'id',  type: 'string'},
        {name: 'employeeName',  type: 'string'}
    ]
});


Ext.define('Passport', {
    extend: 'Ext.data.Model',
    fields: [
        { 
            name: 'employeeId',
            reference: {
                parent: 'Employee',
                inverse: {
                    autoLoad: false
                }
            }
        },
        {name: 'id',  type: 'string'}
    ],
    
    proxy: {
        type: 'ajax',
        url : '../policepassport/store',
        reader: {
            type: 'json',
            root: 'results',
            totalProperty: 'total'
        }
    }
});

Ext.define('CommonModel', {
    extend: 'Ext.data.Model',
    fields: [
        {name: 'id',  type: 'string'},
        {name: 'text',  type: 'string'}
    ]
});
